<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        .box1{
            /* 脱离文档流，相当于在另一层上摆放位置 */
            float: right;
            
            width: 100px;
            height: 100px;
            background-color: violet;
        }
        .box2{
            width: 200px;
            height: 200px;
            background-color: aqua;
        }
    </style>
</head>

<body>

    <div class="box1"></div>
    <div class="box2"></div>

</body>

</html>